
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>第十一章 排序算法 · C语言程序设计精髓程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="马小安">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-disqus/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism-base16-ateliersulphurpool.light.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-katex/katex.min.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-terminal/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Glossary.html" />
    
    
    <link rel="prev" href="chapter10.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                        <b>1.1.</b>
                    
                    笔记内容介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="chapter1.html">
            
                <a href="chapter1.html">
            
                    
                        <b>1.2.</b>
                    
                    第一章 基础知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="chapter2.html">
            
                <a href="chapter2.html">
            
                    
                        <b>1.3.</b>
                    
                    第二章 数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="chapter3.html">
            
                <a href="chapter3.html">
            
                    
                        <b>1.4.</b>
                    
                    第三章 顺序结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="chapter4.html">
            
                <a href="chapter4.html">
            
                    
                        <b>1.5.</b>
                    
                    第四章 选择结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="chapter5.html">
            
                <a href="chapter5.html">
            
                    
                        <b>1.6.</b>
                    
                    第五章 循环结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="chapter6.html">
            
                <a href="chapter6.html">
            
                    
                        <b>1.7.</b>
                    
                    第六章 数组概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="chapter7.html">
            
                <a href="chapter7.html">
            
                    
                        <b>1.8.</b>
                    
                    第七章 函数与预编译
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="chapter8_1.html">
            
                <a href="chapter8_1.html">
            
                    
                        <b>1.9.</b>
                    
                    第八章 指针类型(1)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="chapter8_2.html">
            
                <a href="chapter8_2.html">
            
                    
                        <b>1.10.</b>
                    
                    第八章 指针类型(2)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="chapter9_1.html">
            
                <a href="chapter9_1.html">
            
                    
                        <b>1.11.</b>
                    
                    第九章 结构体类型(1)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="chapter9_2.html">
            
                <a href="chapter9_2.html">
            
                    
                        <b>1.12.</b>
                    
                    第九章 结构体类型(2)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="chapter9_3.html">
            
                <a href="chapter9_3.html">
            
                    
                        <b>1.13.</b>
                    
                    第九章 结构体类型(3)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="chapter10.html">
            
                <a href="chapter10.html">
            
                    
                        <b>1.14.</b>
                    
                    第十章 位运算
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.15" data-path="chapter11.html">
            
                <a href="chapter11.html">
            
                    
                        <b>1.15.</b>
                    
                    第十一章 排序算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="Glossary.html">
            
                <a href="Glossary.html">
            
                    
                        <b>1.16.</b>
                    
                    其他资源
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >第十一章 排序算法</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x7EBF;&#x6027;&#x67E5;&#x627E;">&#x7EBF;&#x6027;&#x67E5;&#x627E;</h1>
<pre class="language-"><code class="lang-C"><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">lineSearch</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> x,<span class="hljs-keyword">int</span> n)</span><span class="hljs-comment">//&#x7EBF;&#x6027;&#x67E5;&#x627E;</span>
</span>{
    <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> i=<span class="hljs-number">0</span>;i&lt;n;i++)
    {
        <span class="hljs-keyword">if</span> (num[i]==x)
            {
                <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
            }
    }
    <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
}
</code></pre>
<h1 id="&#x4E8C;&#x5206;&#x6CD5;&#x67E5;&#x627E;">&#x4E8C;&#x5206;&#x6CD5;&#x67E5;&#x627E;</h1>
<pre class="language-"><code class="lang-C"><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">BinarySearch</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> x,<span class="hljs-keyword">int</span> n)</span><span class="hljs-comment">//&#x5047;&#x8BBE;&#x6570;&#x7EC4;&#x5347;&#x5E8F;&#x6392;&#x5E8F;</span>
</span>{
    <span class="hljs-keyword">int</span> low = <span class="hljs-number">0</span>,high = n<span class="hljs-number">-1</span>,mid;
    <span class="hljs-keyword">while</span>(low &lt;=high)<span class="hljs-comment">//&#x533A;&#x95F4;&#x5B58;&#x5728;</span>
    {
        mid=(high+low)/<span class="hljs-number">2</span>;<span class="hljs-comment">//mid = low +(high-low)/2;&#x65B9;&#x77E5;&#x6570;&#x503C;&#x6EA2;&#x51FA;&#x3002;&#x5206;&#x6CBB;&#x601D;&#x60F3;&#x7684;&#x5B8C;&#x7F8E;&#x4F53;&#x73B0;</span>
        <span class="hljs-keyword">if</span>(x&gt;num[mid])
        {
            low=mid+<span class="hljs-number">1</span>;
        }
        <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(x&lt;num[mid])
        {
            high=mid<span class="hljs-number">-1</span>;
        }
        <span class="hljs-keyword">else</span>
        {
            <span class="hljs-keyword">return</span> mid;    <span class="hljs-comment">//&#x8FD4;&#x56DE;&#x4E0B;&#x6807;&#x4F4D;&#x7F6E;</span>
        }
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
}
</code></pre>
<h1 id="&#x4EA4;&#x6362;&#x6392;&#x5E8F;">&#x4EA4;&#x6362;&#x6392;&#x5E8F;</h1>
<pre class="language-"><code class="lang-C"><span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">SwithSort</span><span class="hljs-params">(<span class="hljs-keyword">int</span> score[],<span class="hljs-keyword">int</span> n)</span><span class="hljs-comment">//&#x5347;&#x5E8F;&#x6392;&#x5217;</span>
</span>{
    <span class="hljs-keyword">int</span> temp;
    <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i=<span class="hljs-number">0</span>;i&lt;n<span class="hljs-number">-1</span>;i++)
        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> j=j+<span class="hljs-number">1</span>;j&lt;n;j++)
        {
            <span class="hljs-keyword">if</span>(score[i]&gt;score[j])
                temp=score[i];
                score[i]=score[j];
                score[j]=temp;
        }
}
</code></pre>
<h1 id="&#x9009;&#x62E9;&#x6392;&#x5E8F;">&#x9009;&#x62E9;&#x6392;&#x5E8F;</h1>
<pre class="language-"><code class="lang-C"><span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">SelectSort</span><span class="hljs-params">(<span class="hljs-keyword">int</span> score[],<span class="hljs-keyword">int</span> n)</span>
</span>{
    <span class="hljs-keyword">int</span> temp,k,i,j;
    <span class="hljs-keyword">for</span>(i=<span class="hljs-number">0</span>;i&lt;n<span class="hljs-number">-1</span>;++i)
    {
                k=i;
        <span class="hljs-keyword">for</span>(j=<span class="hljs-number">0</span>;j&lt;n;j++)
        {
            <span class="hljs-keyword">if</span>(score[j]&lt;score[i])
                k=j;
        }
        <span class="hljs-keyword">if</span>(k!=i)
        {
            temp=score[k];
            score[k]=score[j];
            score[j]=temp;
        }
    }        
}
</code></pre>
<h1 id="&#x5192;&#x6CE1;&#x6392;&#x5E8F;">&#x5192;&#x6CE1;&#x6392;&#x5E8F;</h1>
<pre class="language-"><code class="lang-c"><span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">BubbleSort</span><span class="hljs-params">(<span class="hljs-keyword">int</span> score[],<span class="hljs-keyword">int</span> n)</span>
</span>{
    <span class="hljs-keyword">int</span> i,j,temp;
    <span class="hljs-keyword">for</span>(i=<span class="hljs-number">0</span>;i&lt;n<span class="hljs-number">-1</span>;i++)
    {
        <span class="hljs-keyword">for</span>(j=<span class="hljs-number">1</span>;j&lt;n-i;j++) <span class="hljs-comment">//i&#x4E3A;&#x5DF2;&#x7ECF;&#x6392;&#x597D;&#x5E8F;&#x7684;&#x5143;&#x7D20;</span>
        {
            <span class="hljs-keyword">if</span>(score[j]&lt;score[j<span class="hljs-number">-1</span>])<span class="hljs-comment">// j&#x4ECE;1&#x5F00;&#x59CB;</span>
            {
                temp=score[j];
                score[j]=score[j<span class="hljs-number">-1</span>];
                score[j<span class="hljs-number">-1</span>]=temp;
            }
        }
    }
}
</code></pre>
<h1 id="&#x5B8C;&#x6574;&#x6848;&#x4F8B;">&#x5B8C;&#x6574;&#x6848;&#x4F8B;</h1>
<pre class="language-"><code class="lang-C"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> N 40</span>
<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">ReadScore</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> score[])</span></span>;
<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">lineSearch</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> x,<span class="hljs-keyword">int</span> n)</span></span>;<span class="hljs-comment">//&#x7EBF;&#x6027;&#x67E5;&#x627E;</span>
<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">BinarySearch</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> x,<span class="hljs-keyword">int</span> n)</span></span>;<span class="hljs-comment">//&#x4E8C;&#x5206;&#x67E5;&#x627E;</span>
<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">SwithSort</span><span class="hljs-params">(<span class="hljs-keyword">int</span> socre[],<span class="hljs-keyword">int</span> n)</span></span>;<span class="hljs-comment">//</span>
<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span>
</span>{
   <span class="hljs-keyword">int</span>   score[N],n,pos;
   <span class="hljs-keyword">long</span>  num[N],x;
   n=ReadScore(num,score);
   <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;Please Input student ID.&quot;</span>);
   <span class="hljs-built_in">scanf</span>(<span class="hljs-string">&quot;%ld&quot;</span>,&amp;x);
   SwithSort(score,n);
   <span class="hljs-comment">//SelectSort(score,n);</span>
   <span class="hljs-comment">//BubbleSort(score,n);</span>
   pos =lineSearch(num,x,n);
   <span class="hljs-comment">//pos =BinarySearch(num,x,n);</span>


   <span class="hljs-keyword">if</span>(pos!=<span class="hljs-number">-1</span>)
       {
           <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;socre=%d\n&quot;</span>,score[pos]);
       }
   <span class="hljs-keyword">else</span>
   {
              <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;Not Found!\n&quot;</span>);
   }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}

<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">lineSearch</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> x,<span class="hljs-keyword">int</span> n)</span><span class="hljs-comment">//&#x7EBF;&#x6027;&#x67E5;&#x627E;</span>
</span>{
    <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> i=<span class="hljs-number">0</span>;i&lt;n;i++)
    {
        <span class="hljs-keyword">if</span> (num[i]==x)
            {
                <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
            }
    }
    <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
}
<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">ReadScore</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> score[])</span>
</span>{
    <span class="hljs-keyword">int</span> i=<span class="hljs-number">-1</span>;
    <span class="hljs-keyword">do</span>
    {
        i++;
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;Input,num,score:&quot;</span> );
        <span class="hljs-built_in">scanf</span>(<span class="hljs-string">&quot;%ld%d&quot;</span>,&amp;num[i],&amp;score[i]);
    }<span class="hljs-keyword">while</span>(score[i]&gt;=<span class="hljs-number">0</span> &amp;&amp; score[i]&lt;=<span class="hljs-number">100</span>);

    <span class="hljs-keyword">return</span> i;
}

<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">BinarySearch</span><span class="hljs-params">(<span class="hljs-keyword">long</span> num[],<span class="hljs-keyword">int</span> x,<span class="hljs-keyword">int</span> n)</span><span class="hljs-comment">//&#x5047;&#x8BBE;&#x6570;&#x7EC4;&#x5347;&#x5E8F;&#x6392;&#x5E8F;</span>
</span>{
    <span class="hljs-keyword">int</span> low = <span class="hljs-number">0</span>,high = n<span class="hljs-number">-1</span>,mid;
    <span class="hljs-keyword">while</span>(low &lt;=high)<span class="hljs-comment">//&#x533A;&#x95F4;&#x5B58;&#x5728;</span>
    {
        mid=(high+low)/<span class="hljs-number">2</span>;<span class="hljs-comment">//mid = low +(high-low)/2;&#x65B9;&#x77E5;&#x6570;&#x503C;&#x6EA2;&#x51FA;&#x3002;&#x5206;&#x6CBB;&#x601D;&#x60F3;&#x7684;&#x5B8C;&#x7F8E;&#x4F53;&#x73B0;</span>
        <span class="hljs-keyword">if</span>(x&gt;num[mid])
        {
            low=mid+<span class="hljs-number">1</span>;
        }
        <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(x&lt;num[mid])
        {
            high=mid<span class="hljs-number">-1</span>;
        }
        <span class="hljs-keyword">else</span>
        {
            <span class="hljs-keyword">return</span> mid;    <span class="hljs-comment">//&#x8FD4;&#x56DE;&#x4E0B;&#x6807;&#x4F4D;&#x7F6E;</span>
        }
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
}


<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">SwithSort</span><span class="hljs-params">(<span class="hljs-keyword">int</span> score[],<span class="hljs-keyword">int</span> n)</span><span class="hljs-comment">//&#x5347;&#x5E8F;&#x6392;&#x5217;</span>
</span>{
    <span class="hljs-keyword">int</span> temp;
    <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i=<span class="hljs-number">0</span>;i&lt;n<span class="hljs-number">-1</span>;i++)
        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> j=j+<span class="hljs-number">1</span>;j&lt;n;j++)
        {
            <span class="hljs-keyword">if</span>(score[i]&gt;score[j])
                temp=score[i];
                score[i]=score[j];
                score[j]=temp;
        }
}

<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">SelectSort</span><span class="hljs-params">(<span class="hljs-keyword">int</span> score[],<span class="hljs-keyword">int</span> n)</span>
</span>{
    <span class="hljs-keyword">int</span> temp,k,i,j;
    <span class="hljs-keyword">for</span>(i=<span class="hljs-number">0</span>;i&lt;n<span class="hljs-number">-1</span>;++i)
    {
                k=i;
        <span class="hljs-keyword">for</span>(j=<span class="hljs-number">0</span>;j&lt;n;j++)
        {
            <span class="hljs-keyword">if</span>(score[j]&lt;score[i])
                k=j;
        }
        <span class="hljs-keyword">if</span>(k!=i)
        {
            temp=score[k];
            score[k]=score[j];
            score[j]=temp;
        }
    }        
}


<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">BubbleSort</span><span class="hljs-params">(<span class="hljs-keyword">int</span> score[],<span class="hljs-keyword">int</span> n)</span>
</span>{
    <span class="hljs-keyword">int</span> i,j,temp;
    <span class="hljs-keyword">for</span>(i=<span class="hljs-number">0</span>;i&lt;n<span class="hljs-number">-1</span>;i++)
    {
        <span class="hljs-keyword">for</span>(j=<span class="hljs-number">1</span>;j&lt;n-i;j++) <span class="hljs-comment">//i&#x4E3A;&#x5DF2;&#x7ECF;&#x6392;&#x597D;&#x5E8F;&#x7684;&#x5143;&#x7D20;</span>
        {
            <span class="hljs-keyword">if</span>(score[j]&lt;score[j<span class="hljs-number">-1</span>])<span class="hljs-comment">// j&#x4ECE;1&#x5F00;&#x59CB;</span>
            {
                temp=score[j];
                score[j]=score[j<span class="hljs-number">-1</span>];
                score[j<span class="hljs-number">-1</span>]=temp;
            }
        }
    }
}
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="chapter10.html" class="navigation navigation-prev " aria-label="Previous page: 第十章 位运算">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Glossary.html" class="navigation navigation-next " aria-label="Next page: 其他资源">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"第十一章 排序算法","level":"1.15","depth":1,"next":{"title":"其他资源","level":"1.16","depth":1,"path":"Glossary.md","ref":"Glossary.md","articles":[]},"previous":{"title":"第十章 位运算","level":"1.14","depth":1,"path":"chapter10.md","ref":"chapter10.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","highlight","-livereload","search-plus@^0.0.11","disqus@^0.1.0","prism@^2.1.0","prism-themes@^0.0.2","emphasize@^1.1.0","katex@^1.1.3","splitter@^0.0.8","terminal@^0.3.2","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prism-themes/themes/prism-base16-ateliersulphurpool.light.css"]},"disqus":{"useIdentifier":false,"shortName":"gitbookuse"},"emphasize":{},"splitter":{},"katex":{},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"prism-themes":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"terminal":{"copyButtons":true,"fade":false,"style":"flat"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true},"search-plus":{}},"theme":"default","author":"马小安","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"C语言程序设计精髓程","language":"zh-hans","gitbook":"*","description":"苏小红(哈工大)"},"file":{"path":"chapter11.md","mtime":"2018-01-31T05:07:36.346Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-01-31T05:09:23.850Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/URI.js/1.16.1/URI.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-disqus/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-terminal/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

